package com.chen.winnerframework.domain.vo;

import cn.afterturn.easypoi.excel.annotation.Excel;
import cn.afterturn.easypoi.excel.annotation.ExcelCollection;
import com.chen.winnerframework.domain.entity.mybatis.rbac.Role;
import io.swagger.annotations.ApiModelProperty;

import java.util.Date;
import java.util.List;

/**
 * 用户视图对象
 *
 * @author chengy
 * @date 2022/11/24
 */
public class UserVo {

    @ApiModelProperty("用户id")
    private Integer id;

    @ApiModelProperty("用户名")
    @Excel(name = "用户名", width = 20)
    private String username;

    @ApiModelProperty("密码")
    @Excel(name = "密码", width = 20)
    private String password;

    @ApiModelProperty("名称")
    @Excel(name = "名称", width = 20)
    private String name;

    @ApiModelProperty("邮箱")
    @Excel(name = "邮箱", width = 20)
    private String email;

    @ApiModelProperty("手机号")
    @Excel(name = "手机号", width = 20)
    private String phoneNumber;

    @ApiModelProperty("性别（1男 0女）")
    @Excel(name = "性别", width = 20, replace = {"男_1", "女_0"})
    private Integer sex;

    @ApiModelProperty("用户头像")
    private String imgUrl;

    @ApiModelProperty("备注")
    @Excel(name = "备注", width = 20)
    private String remark;

    @ApiModelProperty("状态（1启用 0禁用）")
    @Excel(name = "状态", width = 20, replace = {"启用_1", "禁用_0"})
    private Integer status;

    @ApiModelProperty("登录时间")
    private Date loginTime;

    @ApiModelProperty("上次登录时间")
    private Date lastLoginTime;

    @ApiModelProperty("创建时间")
    private Date createTime;

    @ApiModelProperty("角色列表")
    @ExcelCollection(name = "")
    private List<Role> roles;

    @ApiModelProperty("菜单权限列表")
    private List<String> menuPermissions;

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getEmail() {
        return email;
    }

    public void setEmail(String email) {
        this.email = email;
    }

    public String getPhoneNumber() {
        return phoneNumber;
    }

    public void setPhoneNumber(String phoneNumber) {
        this.phoneNumber = phoneNumber;
    }

    public Integer getSex() {
        return sex;
    }

    public void setSex(Integer sex) {
        this.sex = sex;
    }

    public String getImgUrl() {
        return imgUrl;
    }

    public void setImgUrl(String imgUrl) {
        this.imgUrl = imgUrl;
    }

    public String getRemark() {
        return remark;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }

    public Integer getStatus() {
        return status;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }

    public Date getLoginTime() {
        return loginTime;
    }

    public void setLoginTime(Date loginTime) {
        this.loginTime = loginTime;
    }

    public Date getLastLoginTime() {
        return lastLoginTime;
    }

    public void setLastLoginTime(Date lastLoginTime) {
        this.lastLoginTime = lastLoginTime;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public List<Role> getRoles() {
        return roles;
    }

    public void setRoles(List<Role> roles) {
        this.roles = roles;
    }

    public List<String> getMenuPermissions() {
        return menuPermissions;
    }

    public void setMenuPermissions(List<String> menuPermissions) {
        this.menuPermissions = menuPermissions;
    }

}
